package com.wzq.design.business.base.user.dto;

import lombok.Data;

/**
 * 权限信息表
 * @author wangzhiqiang
 * @since   2024/2/24 22:20
 */
@Data
public class AuthResult {
    /**
     * 用户信息
     */
    private UserInfo user;



    @Data
    public static class UserInfo {
        /**
         * 用户id
         */
        private String userId;
        /**
         * 用户名称
         */
        private String userName;

    }

    public static UserInfo fromDto(BaseUserDto baseUserDto){
        UserInfo userInfo=new UserInfo();
        userInfo.setUserId(baseUserDto.getId());
        userInfo.setUserName(baseUserDto.getName());
        return  userInfo;
    }
}
